# Maintainer : Christian Rebischke <Chris.Rebischke@archlinux.org>
# Maintainer : Maxim Baz <$pkgname at maximbaz dot com>
# Contributor: Ian D. Scott <ian@perebruin.com>
# Contributor: Tony Crisci <tony@dubstepdish.com>
pkgname=playerctl
pkgver=2.4.1
pkgrel=3
pkgdesc="mpris media player controller and lib for spotify, vlc, audacious, bmp, xmms2, and others."
arch=('loong64' 'x86_64')
url="https://github.com/altdesktop/playerctl"
license=('LGPL3')
depends=('glib2')
makedepends=('gobject-introspection' 'gtk-doc' 'meson')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
        "${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz.asc")
sha512sums=('2d84f657b07c948cd6990d9e79c4eb6e83f97c387ac53c2322fc0adbeb853950fa935332233329e7555db7d157f3ced6498cc102edaffd78849ca1f7d4c49bdc'
            'SKIP')
validpgpkeys=('8CDFCC2D6611ACDE63D2C348564F0717F9D84E49')

prepare() {
    cd "${srcdir}/playerctl-${pkgver}"
}

build() {
    cd "${srcdir}/playerctl-${pkgver}"
    arch-meson build -D bash-completions=true -D zsh-completions=true
    ninja -C build
}

package() {
    cd "${srcdir}/playerctl-${pkgver}"
    DESTDIR="${pkgdir}" ninja -C build install
}
